@media screen and (min-width: 0px) and (max-width:1110px) {
    :root {
        --bambu-columns: calc(var(--bambu-default-columns,4) - 3);
    }
}
@media screen and (min-width: 1111px) and (max-width:1650px) {
    :root {
        --bambu-columns: calc(var(--bambu-default-columns,4) - 2);
    }
}
@media screen and (min-width: 1651px) and (max-width:2200px) {
    :root {
        --bambu-columns: calc(var(--bambu-default-columns,4) - 1);
    }
}
@media screen and (min-width: 2201px) and (max-width:2750px) {
    :root {
        --bambu-columns: var(--bambu-default-columns,4);
    }
}
@media screen and (min-width: 2751px){
    :root {
        --bambu-columns: calc(var(--bambu-default-columns,4) + 1);
    }
}

.header-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
    gap: var(--lumo-space-m);
}

.dashboard-view {
    display: grid;
    grid-template-columns: repeat(var(--bambu-columns), minmax(0, 1fr));
    gap: var(--lumo-space-m);
    padding: var(--lumo-space-s);
}

.dashboard-printer .name {
    width: 100%;
    font-size: 2em;
    text-align: center;
    padding-bottom: 10px;
}

.dashboard-printer .name div {
    font-weight: bold;
    display: flex;
    width: 100%;
    justify-content: center;
}

.dashboard-printer .name vaadin-button {
    margin: 0.1rem;
}

.dashboard-printer .image {
    flex-direction: column;
    flex-grow: 1;
    display: flex;
    width: 100%;
    min-height: 371px;
    justify-content: center;
    align-items: center;
    background-color: var(--lumo-base-color);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.dashboard-printer .image img {
    min-width: 0;
    flex-grow: 1;
    height: 95%;
    width: 95%;
    max-height: 720px;
    max-width: 1280px;
    object-fit: contain;
    margin: 10px;
}

.dashboard-printer .image iframe {
    flex-grow: 1;
    width: 95%;
    max-height: 720px;
    max-width: 1280px;
    object-fit: contain;
    margin: 10px;
    border: 0px;
}

.dashboard-printer .imagestatus {
    display: flex;
    width: 90%;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    margin-bottom: 10px;
}

.controlsbox iframe {
    height: 60vh;
}

.dashboard-printer .status {
    width: 100%;
    flex-wrap: wrap;
}

.dashboard-printer .badge {
    display: flex;
    flex-direction: column;

    font-weight: bolder;
    align-items: center;
    min-width: 50px;
    padding: var(--lumo-space-s);
    margin: var(--lumo-space-s);
    flex-grow: 1;
    flex-basis: 0;
    background-color: var(--lumo-base-color);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.dashboard-printer .filaments {
    width: 100%;
}

.dashboard-printer .ams {
    width: 100%;
}

.dashboard-printer .amsheader {
    width: 100%;
    height: 30px;
    display: flex;
    flex-wrap: wrap;
}

.dashboard-printer .amsheader span {
    flex-grow: 1;
}

.dashboard-printer .amsheader span.filler {
    flex-grow: 10;
}

.dashboard-printer .amsheader img {
    flex-grow: 1;
    max-height: 30px;
}

.dashboard-printer .amstray {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}

.dashboard-printer .amstray .filament {
    display: flex;
    flex-direction: column;
    font-weight: bolder;
    align-items: center;
    padding: var(--lumo-space-s);
    margin: var(--lumo-space-s);
    flex-grow: 1;
    background-color: var(--lumo-base-color);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.dashboard-printer .amstray .active {
    --lumo-utility-border-color: var(--lumo-success-color);
    border: 2px var(--lumo-utility-border-style, solid) var(--lumo-utility-border-color, var(--lumo-contrast-10pct));
}

.dashboard-printer .amstray .filament .color {
    width: 50px;
    min-height: 50px;
    border: 1px solid;
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.dashboard-printer .progress {
    width: 100%;
    justify-content: space-between;
}

.dashboard-printer vaadin-progress-bar {
    height: 5px;
}

.printer-view {
    flex-wrap: wrap;
    gap: var(--lumo-space-m);
    padding: var(--lumo-space-s);
}

.printer-view .content {
    width: 100%;
}

.dashboard-printer .image .controlsbox {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: var(--lumo-space-m);
}

.controlsbox .controls {
    margin-top: auto;
    margin-bottom: auto;
    margin-right: 10px;
}

.controlsbox .controlheader {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.controlsbox .controlbody {
    display: flex;
}

.controlxy {
    margin-top: auto;
    margin-bottom: auto;
}

.controlxy div.updown {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.controlxy div.leftright {
    display: flex;
}

.controlxy vaadin-button,
.controlz vaadin-button,
.extruder vaadin-button {
    margin: 0.1rem;
}

.controlz {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    width: 150px;
}

.extruder {
    display: flex;
    align-items: center;
    flex-direction: column;
}

.extruder .spacer {
    flex-grow: 1;
}

.filament-view .presets {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.filament-view .presets .preset {
    width: 30px;
    height: 30px;
    padding: var(--lumo-space-s);
    margin: var(--lumo-space-s);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.batchprint-view,
.sdcard-view {
    display: flex;
    flex-direction: column;
    gap: var(--lumo-space-m);
    padding: var(--lumo-space-m);
    align-items: flex-start;
    box-sizing: border-box;
    height: 100%;
}

.batchprint-view .filaments {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;    
}

.batchprint-view-menu vaadin-context-menu-list-box::part(items) {
    display: flex;
}

.batchprint-view-menu vaadin-context-menu-item {
    padding: 0px;
}

.batchprint-view-menu vaadin-context-menu-item::part(checkmark) {
    display: none;
}

.batchprint-view .filaments .filament.contrast,
.batchprint-view .mapping .filament.contrast,
.batchprint-view-menu .filament.contrast {
    color: white;
}

.batchprint-view .filaments .filament,
.batchprint-view-menu .filament {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--lumo-space-s);
    margin: var(--lumo-space-s);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.batchprint-view .filament .filament,
.batchprint-view .mapping .filament,
.batchprint-view-menu .filament {
    color: black;
}

.batchprint-view .mapping .filament {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: var(--lumo-space-s);
    margin: var(--lumo-space-s);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.batchprint-view .mapping .filamenttop,
.batchprint-view-menu .filamenttop {
    justify-content: center;
    padding-bottom: 0px;
    margin-bottom: 0px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.batchprint-view .mapping .filamentbottom,
.batchprint-view-menu .filamentbottom {
    justify-content: center;
    padding-top: 0px;
    margin-top: 0px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.batchprint-view .mapping {
    display: flex;
    flex-direction: column;
}

.batchprint-view vaadin-grid-sorter {
    width: 100%;
}

.batchprint-view .header {
    width: 100%;
    display: flex;
    align-items: center;

    gap: var(--lumo-space-l);
}

.batchprint-view .header .actions {
    display: flex;
    flex-direction: column;
}

.batchprint-view .actions .detail,
.batchprint-view .actions .options,
.batchprint-view .actions .buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--lumo-space-l);
}

.batchprint-view .buttons vaadin-button {
    flex-grow: 1;
    flex-basis: 0;
}

.batchprint-view .header img {
    background-color: var(--lumo-base-color);
    box-shadow: var(--lumo-box-shadow-s);
    border-radius: var(--lumo-border-radius-l);
}

.batchprint-view .header img.small {
    max-height: 256px;
    max-height: 256px;
}

.batchprint-view .filamentmapping {
    display: flex;
    flex-direction: row;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
}